﻿// -----------------------------------------------------------------------
// <copyright file="FileAccess.cs" company="Company">
// Company 2011
// </copyright>
// -----------------------------------------------------------------------

using System;
using System.Runtime.InteropServices;

namespace Company.IO.Interfaces
{
    /// <summary>
    /// <para>
    /// Defines constants for read, write, or read/write access to a file.
    /// </para>
    /// <para>
    /// This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
    /// </para>
    /// </summary>
    [Flags]
    [ComVisible(true)]
    [Serializable]
    public enum FileAccess
    {
        /// <summary>
        /// Read access to the file. Data can be read from the file. Combine with Write for read/write access.
        /// </summary>
        Read = System.IO.FileAccess.Read,

        /// <summary>
        /// Write access to the file. Data can be written to the file. Combine with Read for read/write access.
        /// </summary>
        Write = System.IO.FileAccess.Write,

        /// <summary>
        /// Read and write access to the file. Data can be written to and read from the file.
        /// </summary>
        ReadWrite = System.IO.FileAccess.ReadWrite,
    }
}